<template>
  <div v-if="!$isWxAppIos() && status > 0" @click="handelClickShow" class="c-bg-white c-flex-row c-justify-sb c-aligni-center c-hh80 c-ph24 c-boxSizing-c">
    <template v-if="status == 2">
      <div class="c-flex-row c-aligni-center c-text-hidden">
        <slot name="title"><div class="c-fs24 c-mr24 c-fc-xblack c-fw600 c-flex-shrink0">玩法</div></slot>
        <slot name="desc"><div class="c-fc-gray c-fs24 c-text-ellipsis1">邀请好友砍价，超低价购买心仪课程</div></slot>
      </div>
      <i class="iconfont c-fs24 c-fc-gray">&#xe635;</i>
    </template>
    <span v-else-if="isPreheat == 1 && status == 1" class="c-fc-gray c-fs24">当前活动还未开始，请耐心等待</span>
    <cj-popup v-model='showCoupon' round position="bottom" title="玩法详情" get-container="body" :closeable="true" class="c-pb20">
      <div class="c-ph20 c-fs24 c-lh46">
        <p>1.活动期间消费者可邀请好友帮忙砍价，好友砍到底价后，即可按照底价购买商品；</p>
        <p>2.好友帮忙砍到底价后，消费者须在有效期内购买砍价商品，逾期商品将恢复原价；</p>
        <p>3.虚拟商品，同一用户仅可发起一次砍价活动享受优惠价格；实体商品，同一用户可根据商家设置发起一次或多次砍价活动享受优惠价格；</p>
        <p>4.同一商品，同一用户仅能帮好友砍价一次；</p>
        <p>5.砍价商品不与其他活动/优惠福利同享；</p>
        <p>6.砍价商品数量有限，商品售罄后，商品将无法购买，即使你已经发起砍价;</p>
        <p>7.砍价活动不参与赠送礼品活动。</p>
      </div>
      <div class="c-ph20">
        <div @click="showCoupon = false" class="c-flex-row c-justify-center c-aligni-center c-w100 c-hh64 c-mt20 c-fc-white c-fs24 theme-bg c-br32">我知道了</div>
      </div>
    </cj-popup>
  </div>
  <!-- <div v-if="!$isWxAppIos()" :class="defaultStyle">
    <div class="c-ph24 c-flex-row c-fs24 c-fc-gray c-flex-row c-aligni-center" @click="handelClickShow">
      <div class="c-fs24 c-mr24 c-fc-xblack c-fw600 c-pv16 c-hh80 c-flex-row c-aligni-center" v-if="status == 2">
        <slot name="title">玩法</slot>
      </div>
      <div class="c-flex-grow1">
        <template v-if="status == 2">
          <div class="c-pv16 c-flex-row c-justify-sb c-aligni-center">
            <slot name="desc">邀请好友砍价，超低价购买心仪课程</slot>
            <i class="iconfont c-fs24">&#xe635;</i>
          </div>
        </template>
        <template v-if="isPreheat == 1 && status == 1">
          <div class="c-pv16 c-flex-row c-justify-center c-aligni-center">
            <span>当前活动还未开始，请耐心等待</span>
          </div>
        </template>
      </div>
    </div>
    <cj-popup v-model='showCoupon' round position="bottom" title="玩法详情" get-container="body" :closeable="true" class="c-pb20">
      <div class="c-ph20 c-fs24 c-lh46">
        <p>1.活动期间消费者可邀请好友帮忙砍价，好友砍到底价后，即可按照底价购买商品；</p>
        <p>2.好友帮忙砍到底价后，消费者须在有效期内购买砍价商品，逾期商品将恢复原价；</p>
        <p>3.虚拟商品，同一用户仅可发起一次砍价活动享受优惠价格；实体商品，同一用户可根据商家设置发起一次或多次砍价活动享受优惠价格；</p>
        <p>4.同一商品，同一用户仅能帮好友砍价一次；</p>
        <p>5.砍价商品不与其他活动/优惠福利同享；</p>
        <p>6.砍价商品数量有限，商品售罄后，商品将无法购买，即使你已经发起砍价;</p>
        <p>7.砍价活动不参与赠送礼品活动。</p>
      </div>
      <div class="c-ph20">
        <div @click="showCoupon = false" class="c-flex-row c-justify-center c-aligni-center c-w100 c-hh64 c-mt20 c-fc-white c-fs24 theme-bg c-br32">我知道了</div>
      </div>
    </cj-popup>
  </div> -->
</template>

<script>
  export default {
    name: "BargainRules",
    components: {},
    props: {
      isPreheat: { //当前是否开启预热 1 开启 2 不开启
        type: Number,
        default: 0
      },
      status: {
        // 活动状态
        type: Number,
        default: 0
      },
      // defaultStyle: {
      //   type: String,
      //   default: 'c-bd-t12-f5'
      // }
    },
    data() {
      return {
        showCoupon: false,
        theme: localStorage.getItem("colorName") ? localStorage.getItem("colorName") : 'mb5_default',
      }
    },
    methods: {
      handelClickShow() {
        if (this.status == 2) {
          this.showCoupon = true;
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
.coms-bargain-rules{
  background: #fff;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  height: 2rem;
}
</style>